package com.jsm.tf.net.command;

import com.jsm.tf.controller.RoomController;
import com.jsm.tf.net.message.response.RoomChatResponseMessage;
import io.netty.channel.Channel;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class RoomChatResponseMessageCommand implements Command<RoomChatResponseMessage> {
    @Resource
    private RoomController roomController;

    @Override
    public void execute(RoomChatResponseMessage message, Channel channel) {
        roomController.acceptRoomChatMessage(message.getSendUserNickname(), message.getContent());
    }
}
